import request from '@/utils/request'

// 获取销售统计数据
export function getSalesStats(params) {
  return request({
    url: '/statistics/sales',
    method: 'get',
    params
  })
}

// 获取用户行为数据
export function getUserBehaviorStats(params) {
  return request({
    url: '/statistics/user-behavior',
    method: 'get',
    params
  })
}

// 获取商品销量排行
export function getProductRankings(params) {
  return request({
    url: '/statistics/product-rankings',
    method: 'get',
    params
  })
}

// 获取用户增长数据
export function getUserGrowth(params) {
  return request({
    url: '/statistics/user-growth',
    method: 'get',
    params
  })
}

// 导出统计数据
export function exportStatistics(params) {
  return request({
    url: '/statistics/export',
    method: 'get',
    params,
    responseType: 'blob'
  })
} 